home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / Examples / Tasks / TaskA.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-07  |  585 b   |  33 lines

  1. #include <exec/types.h>
  2. #include <exec/nodes.h>
  3. #include <exec/lists.h>
  4. #include <exec/memory.h>
  5. #include <powerup/ppclib/interface.h>
  6. #include <powerup/gcclib/powerup_protos.h>
  7.  
  8. int    main(void)
  9. {
  10. BPTR        MyFile;
  11. ULONG        MySignal;
  12.  
  13.   if (MyFile=PPCOpen("con:0/0/640/200/TaskA/CLOSE",MODE_NEWFILE))
  14.   {
  15.     for (;;)
  16.     {
  17.       if (PPCSetSignal(0L,SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C)
  18.       {
  19.         break;
  20.       }
  21.       PPCfprintf(MyFile,
  22.                  "Task A is active\n");
  23.  
  24.     }
  25.     PPCClose(MyFile);
  26.   }
  27.   else
  28.   {
  29.     PPCprintf("Couldn`t open CLI Window\n");
  30.   }
  31.   return(0);
  32. }
  33.